//
//  EMsgTableViewConfig.swift
//  swiftim
//
//  Created by yangjian on 2023/6/2.
//

import Foundation

class MsgTableViewConfig{
    static let share = MsgTableViewConfig()
    private init(){}

    //展示头像昵称方面
    var singleSend_showName = false
    var singleReceive_showName = true
    var groupSend_showName = true
    var groupReceive_showName = true
    var chatroomSend_showName = true
    var chatroomReceive_showName = true
    
    var singleSend_showHead = true
    var singleReceive_showHead = true
    var groupSend_showHead = true
    var groupReceive_showHead = true
    var chatroomSend_showHead = true
    var chatroomReceive_showHead = true
    
    var nameFont = UIFont.systemFont(ofSize: 12, weight: .regular)
    var stateFont = UIFont.systemFont(ofSize: 12, weight: .regular)
    var timeFont = UIFont.systemFont(ofSize: 12, weight: .regular)
    var systemTextFont = UIFont.systemFont(ofSize: 13, weight: .regular)
    var textFont = UIFont.systemFont(ofSize: 17, weight: .regular)
    var voiceConvertTextFont = UIFont.systemFont(ofSize: 17, weight: .regular) //语音转文字
    var customDescriptionFont = UIFont.systemFont(ofSize: 14, weight: .regular)
    var addressFont = UIFont.systemFont(ofSize: 14, weight: .regular)
    
    func showName(chatType : EMChatType,direction : EMMessageDirection) -> Bool{
        switch (chatType) {
        case .chat:
            switch (direction) {
            case .send: return self.singleSend_showName;
            case .receive: return self.singleReceive_showName;
            default:return false;
            }
        case .groupChat:
            switch (direction) {
            case .send: return self.groupSend_showName;
            case .receive: return self.groupReceive_showName;
            default:return false;
            }
        case .chatRoom:
            switch (direction) {
            case .send: return self.chatroomSend_showName;
            case .receive: return self.chatroomReceive_showName;
            default:return false;
            }
        default:return false;
        }

    }
    
    func showHead(chatType : EMChatType,direction : EMMessageDirection) -> Bool{
        switch (chatType) {
        case .chat:
            switch (direction) {
            case .send: return self.singleSend_showHead;
            case .receive: return self.singleReceive_showHead;
            default:return false;
            }
        case .groupChat:
            switch (direction) {
            case .send: return self.groupSend_showHead;
            case .receive: return self.groupReceive_showHead;
            default:return false;
            }
        case .chatRoom:
            switch (direction) {
            case .send: return self.chatroomSend_showHead;
            case .receive: return self.chatroomReceive_showHead;
            default:return false;
            }
        default:return false;
        }
    }
}


